package com.qdsg.ysg.doctor.ui;//package com.qdsg.ysg.doctor.ui;
//
//import android.graphics.Color;
//import android.os.Build;
//import android.support.v4.view.ViewCompat;
//import android.util.Log;
//import android.view.View;
//import android.view.ViewGroup;
//import android.view.Window;
//import android.view.WindowManager;
//import android.widget.Toast;
//
//import com.chinamobile.ysx.YSXJoinMeetingOptions;
//import com.chinamobile.ysx.YSXMeetingService;
//import com.chinamobile.ysx.YSXSdk;
//
//import butterknife.OnClick;
//import com.qdsg.ysg.doctor.R;
//import com.qdsg.ysg.doctor.base.BaseActivity;
//
///**
// * Created by HP on 2018/9/20.
// */
//
//public class PhoneActivity extends BaseActivity {
//
//    String meetingNo;
//
//    @Override
//    protected void initViews() {
//
//    }
//
//    @Override
//    protected void initData() {
//        meetingNo = getIntent().getStringExtra("meetingNo");
//    }
//
//    @Override
//    protected int getLayoutResource() {
//        return R.layout.activity_phone;
//    }
//
//    @OnClick(R.id.btn_accept)
//    void btn_accept() {
//        onClickBtnJoinMeeting(meetingNo);
//        finish();
//    }
//
//    @OnClick(R.id.btn_decline)
//    void btn_decline() {
//        finish();
//    }
//
//    public void onClickBtnJoinMeeting(String meetingNo) {
//
//        if (meetingNo.length() == 0) {
//            Toast.makeText(this, "You need to enter a meeting number which you want to join.", Toast.LENGTH_LONG).show();
//            return;
//        }
//
//        YSXSdk sdk = YSXSdk.getInstance();
//
//        if (!sdk.isInitialized()) {
//            Toast.makeText(this, "ysxSDK has not been initialized successfully", Toast.LENGTH_LONG).show();
//            return;
//        }
//
//        YSXMeetingService meetingService = sdk.getMeetingService();
//
//        YSXJoinMeetingOptions opts = new YSXJoinMeetingOptions();
////		opts.no_driving_mode = true;
////        opts.no_invite = true;
////		opts.no_meeting_end_message = true;
////		opts.no_titlebar = true;
////		opts.no_bottom_toolbar = true;
////		opts.no_dial_in_via_phone = true;
////		opts.no_dial_out_to_phone = true;
//        opts.no_disconnect_audio = true;
////		opts.no_share = true;
////		opts.invite_options = YSXInviteOptions.INVITE_VIA_EMAIL + YSXInviteOptions.INVITE_VIA_SMS;
////		opts.meeting_views_options = YSXMeetingViewsOptions.NO_BUTTON_SHARE;
//        opts.no_audio = false;
//        opts.no_video = false;
////		opts.no_meeting_error_message = true;
////		opts.participant_id = "participant id";
//
//        int ret = meetingService.joinMeeting(this, meetingNo, "test", "", opts);
//
//        Log.i("", "onClickBtnJoinMeeting, ret=" + ret);
//    }
//
//
//    @Override
//    public void initState() {
//        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
//            Window window = this.getWindow();
//            //取消状态栏透明
//            window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
//            //添加Flag把状态栏设为可绘制模式
//            window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
//            //设置状态栏颜色
//            window.setStatusBarColor(Color.parseColor("#333333"));
//            //设置系统状态栏处于可见状态
//            getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
//
////            window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
//            //让view不根据系统窗口来调整自己的布局
//            ViewGroup mContentView = (ViewGroup) window.findViewById(Window.ID_ANDROID_CONTENT);
//            View mChildView = mContentView.getChildAt(0);
//            if (mChildView != null) {
//                ViewCompat.setFitsSystemWindows(mChildView, false);
//                ViewCompat.requestApplyInsets(mChildView);
//            }
//        }
//    }
//}
